package com.xjnt.frameworks.web.jcaptcha;

import com.octo.captcha.service.image.DefaultManageableImageCaptchaService;


/**
 * @FileName : ManageableImageCaptchaService.java
 * @Description : 
 * @Copyright : Copyright (c) 2015
 * @author caoyong
 * @date Jul 31, 2015 6:04:21 PM
 */
public class ManageableImageCaptchaService extends DefaultManageableImageCaptchaService {
	public ManageableImageCaptchaService(com.octo.captcha.service.captchastore.CaptchaStore captchaStore, com.octo.captcha.engine.CaptchaEngine captchaEngine, int minGuarantedStorageDelayInSeconds, int maxCaptchaStoreSize, int captchaStoreLoadBeforeGarbageCollection) {
        super(captchaStore, captchaEngine, minGuarantedStorageDelayInSeconds, maxCaptchaStoreSize, captchaStoreLoadBeforeGarbageCollection);
    }

    public boolean hasCapcha(String id, String userCaptchaResponse) {
        return store.getCaptcha(id).validateResponse(userCaptchaResponse);
    }
}
